package com.yunxi.model.sys;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.yunxi.core.web.DateJsonDeserializer;
import lombok.Data;

import java.util.Date;
import java.util.List;

@TableName(value = "sys_role_menu")
@Data
public class RoleMenu {
    @TableId(type = IdType.UUID)
    private String roleMenuId;
    private String roleId;
    private String menuId;

    @JsonDeserialize(using=DateJsonDeserializer.class)
    @TableField(value="CREATE_TIME",fill = FieldFill.INSERT)
    private Date createTime;


    @TableField(value = "CREATE_BY", fill = FieldFill.INSERT)
    private Long createBy;

    @JsonDeserialize(using = DateJsonDeserializer.class)
    @TableField(value = "UPDATE_TIME", fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableField(value = "UPDATE_BY", fill = FieldFill.UPDATE)
    private Long updateBy;

    @TableField(exist = false)
    private transient List<RoleMenu> roleMenuList;

}